/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.wors.android.custom.rideshare;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.Button;

/**
 *
 * @author 231260
 */
public class KalendarButton extends Button {
	
	String date;
	int position;
	int week;
	
	public KalendarButton(Context context)
	{
		super(context);
	}
	
	public KalendarButton(Context context, AttributeSet attrs)
	{
		super(context, attrs);
		initKalendarButton(attrs);
	}
	
	public KalendarButton(Context context, AttributeSet attrs, int defStyle)
	{
		super(context, attrs, defStyle);
		initKalendarButton(attrs);
	}

	private void initKalendarButton(AttributeSet attrs) {
		TypedArray a = getContext().obtainStyledAttributes(attrs,R.styleable.KalendarButton);
		
		date = a.getString(R.styleable.KalendarButton_date);
		position = a.getInt(R.styleable.KalendarButton_position,0);
		week = a.getInt(R.styleable.KalendarButton_week,1);
		
		a.recycle();
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public int getPosition() {
		return position;
	}

	public void setPosition(int position) {
		this.position = position;
	}

	public int getWeek() {
		return week;
	}

	public void setWeek(int week) {
		this.week = week;
	}
}
